(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     12185,        430]
NotebookOptionsPosition[     11122,        388]
NotebookOutlinePosition[     11460,        403]
CellTagsIndexPosition[     11417,        400]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
 RowBox[{
  RowBox[{"fun", "[", "x_", "]"}], ":=", 
  RowBox[{"Sqrt", "[", 
   RowBox[{"a", "/", 
    RowBox[{"(", 
     RowBox[{"b", "-", 
      RowBox[{"c", " ", 
       RowBox[{"x", "^", "2"}]}]}], ")"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.506597001570074*^9, 3.506597058162891*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"D", "[", 
  RowBox[{
   RowBox[{"fun", "[", "x", "]"}], ",", " ", "x"}], "]"}]], "Input",
 CellChangeTimes->{{3.506597062363181*^9, 3.506597069756124*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{"a", " ", "c", " ", "x"}], 
  RowBox[{
   SqrtBox[
    FractionBox["a", 
     RowBox[{"b", "-", 
      RowBox[{"c", " ", 
       SuperscriptBox["x", "2"]}]}]]], " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{"b", "-", 
      RowBox[{"c", " ", 
       SuperscriptBox["x", "2"]}]}], ")"}], "2"]}]]], "Output",
 CellChangeTimes->{3.506597071121286*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"gs", "[", 
   RowBox[{"d_", ",", "m_"}], "]"}], "=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"n", "-", 
      RowBox[{"2", " ", "d"}]}], ")"}], "^", "2"}], "/", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"n", "-", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"n", "/", "2"}], "-", "m"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"n", "/", "2"}], "+", "m"}], ")"}]}]}], ")"}], "^", 
    "2"}]}]}]], "Input",
 CellChangeTimes->{{3.50659734442452*^9, 3.506597398041268*^9}}],

Cell[BoxData[
 FractionBox[
  SuperscriptBox[
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "2"}], " ", "d"}], "+", "n"}], ")"}], "2"], 
  SuperscriptBox[
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "2"}], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "m"}], "+", 
        FractionBox["n", "2"]}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{"m", "+", 
        FractionBox["n", "2"]}], ")"}]}], "+", "n"}], ")"}], "2"]]], "Output",\

 CellChangeTimes->{{3.506597387440224*^9, 3.506597399091163*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"D", "[", 
  RowBox[{
   RowBox[{"gs", "[", 
    RowBox[{"d", ",", "m"}], "]"}], ",", " ", "m"}], "]"}]], "Input",
 CellChangeTimes->{{3.506597407356813*^9, 3.506597417194952*^9}}],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "m"}], "+", 
         FractionBox["n", "2"]}], ")"}]}], "+", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{"m", "+", 
         FractionBox["n", "2"]}], ")"}]}]}], ")"}], " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "2"}], " ", "d"}], "+", "n"}], ")"}], "2"]}], 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "m"}], "+", 
         FractionBox["n", "2"]}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{"m", "+", 
         FractionBox["n", "2"]}], ")"}]}], "+", "n"}], ")"}], 
    "3"]]}]], "Output",
 CellChangeTimes->{3.50659741832847*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"D", "[", 
  RowBox[{
   RowBox[{"gs", "[", 
    RowBox[{"d", ",", "m"}], "]"}], ",", " ", "d"}], "]"}]], "Input",
 CellChangeTimes->{{3.50659742774291*^9, 3.506597427886763*^9}}],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{"4", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", "d"}], "+", "n"}], ")"}]}], 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "m"}], "+", 
         FractionBox["n", "2"]}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{"m", "+", 
         FractionBox["n", "2"]}], ")"}]}], "+", "n"}], ")"}], 
    "2"]]}]], "Output",
 CellChangeTimes->{3.506597428281904*^9}]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.506604104340219*^9, 3.506604105030715*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"gt", "[", 
   RowBox[{"d_", ",", "m_"}], "]"}], "=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"n", "-", 
      RowBox[{"2", " ", "d"}]}], ")"}], "/", 
    RowBox[{"(", 
     RowBox[{"n", "-", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"n", "/", "2"}], "-", "m"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"n", "/", "2"}], "+", "m"}], ")"}]}]}], ")"}]}], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"Sqrt", "[", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", 
         RowBox[{"n", "/", "2"}], "+", "m"}], ")"}], 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "n", "+", "d"}], ")"}], "/", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"n", "/", "2"}], "-", "m"}], ")"}]}]}], "]"}], "+", 
     RowBox[{"Sqrt", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"n", "/", "2"}], "-", "m"}], ")"}], "/", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"n", "/", "2"}], "+", "m"}], ")"}]}], " ", "d"}], "]"}]}], 
    ")"}], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"Sqrt", "[", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", 
         RowBox[{"n", "/", "2"}], "-", "m"}], ")"}], " ", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "n", "+", "d"}], ")"}], "/", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"n", "/", "2"}], "+", "m"}], ")"}]}]}], "]"}], "+", 
     RowBox[{"Sqrt", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"n", "/", "2"}], "+", "m"}], ")"}], "/", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"n", "/", "2"}], "-", "m"}], ")"}]}], " ", "d"}], "]"}]}], 
    ")"}]}]}]], "Input",
 CellChangeTimes->{{3.506604111589079*^9, 3.506604360489166*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     SqrtBox[
      FractionBox[
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "+", "d", "-", "n"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{"1", "+", "m", "-", 
          FractionBox["n", "2"]}], ")"}]}], 
       RowBox[{"1", "-", "m", "-", 
        FractionBox["n", "2"]}]]], "+", 
     SqrtBox[
      FractionBox[
       RowBox[{"d", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "m"}], "+", 
          FractionBox["n", "2"]}], ")"}]}], 
       RowBox[{"m", "+", 
        FractionBox["n", "2"]}]]]}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{
     SqrtBox[
      FractionBox[
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "+", "d", "-", "n"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", "m", "-", 
          FractionBox["n", "2"]}], ")"}]}], 
       RowBox[{"1", "+", "m", "-", 
        FractionBox["n", "2"]}]]], "+", 
     SqrtBox[
      FractionBox[
       RowBox[{"d", " ", 
        RowBox[{"(", 
         RowBox[{"m", "+", 
          FractionBox["n", "2"]}], ")"}]}], 
       RowBox[{
        RowBox[{"-", "m"}], "+", 
        FractionBox["n", "2"]}]]]}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "2"}], " ", "d"}], "+", "n"}], ")"}]}], 
  RowBox[{
   RowBox[{
    RowBox[{"-", "2"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "m"}], "+", 
      FractionBox["n", "2"]}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{"m", "+", 
      FractionBox["n", "2"]}], ")"}]}], "+", "n"}]]], "Output",
 CellChangeTimes->{3.506604367846538*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"gt", "[", 
     RowBox[{"d", ",", "m"}], "]"}], ",", " ", "m"}], "]"}], "//", 
  "CForm"}]], "Input",
 CellChangeTimes->{{3.506604438588291*^9, 3.506604462347801*^9}}],

Cell["\<\
-(((Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - n/2.)) + 
          Sqrt((d*(-m + n/2.))/(m + n/2.)))*(-2*(-m + n/2.) + 2*(m + n/2.))*
        (Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.)) + 
          Sqrt((d*(m + n/2.))/(-m + n/2.)))*(-2*d + n))/
      Power(-2*(-m + n/2.)*(m + n/2.) + n,2)) + 
   ((Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - n/2.)) + 
        Sqrt((d*(-m + n/2.))/(m + n/2.)))*
      ((-(((1 + d - n)*(1 - m - n/2.))/Power(1 + m - n/2.,2)) - 
           (1 + d - n)/(1 + m - n/2.))/
         (2.*Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.))) + 
        (d/(-m + n/2.) + (d*(m + n/2.))/Power(-m + n/2.,2))/
         (2.*Sqrt((d*(m + n/2.))/(-m + n/2.))))*(-2*d + n))/
    (-2*(-m + n/2.)*(m + n/2.) + n) + 
   ((((1 + d - n)/(1 - m - n/2.) + 
           ((1 + d - n)*(1 + m - n/2.))/Power(1 - m - n/2.,2))/
         (2.*Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - n/2.))) + 
        (-((d*(-m + n/2.))/Power(m + n/2.,2)) - d/(m + n/2.))/
         (2.*Sqrt((d*(-m + n/2.))/(m + n/2.))))*
      (Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.)) + 
        Sqrt((d*(m + n/2.))/(-m + n/2.)))*(-2*d + n))/(-2*(-m + n/2.)*(m + \
n/2.) + n)\
\>", "Output",
 CellChangeTimes->{3.506604462897668*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"gt", "[", 
     RowBox[{"d", ",", "m"}], "]"}], ",", " ", "d"}], "]"}], "//", 
  "CForm"}]], "Input",
 CellChangeTimes->{{3.506604446489954*^9, 3.5066044468242*^9}, 
   3.5066046484465*^9}],

Cell["\<\
(-2*(Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - n/2.)) + 
        Sqrt((d*(-m + n/2.))/(m + n/2.)))*
      (Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.)) + 
        Sqrt((d*(m + n/2.))/(-m + n/2.))))/(-2*(-m + n/2.)*(m + n/2.) + n) + 
   ((Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - n/2.)) + 
        Sqrt((d*(-m + n/2.))/(m + n/2.)))*
      ((1 - m - n/2.)/
         (2.*Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.))*(1 + m - \
n/2.)) + 
        (m + n/2.)/(2.*(-m + n/2.)*Sqrt((d*(m + n/2.))/(-m + n/2.))))*(-2*d + \
n))/
    (-2*(-m + n/2.)*(m + n/2.) + n) + 
   (((1 + m - n/2.)/
         (2.*(1 - m - n/2.)*Sqrt(((1 + d - n)*(1 + m - n/2.))/(1 - m - \
n/2.))) + 
        (-m + n/2.)/(2.*Sqrt((d*(-m + n/2.))/(m + n/2.))*(m + n/2.)))*
      (Sqrt(((1 + d - n)*(1 - m - n/2.))/(1 + m - n/2.)) + 
        Sqrt((d*(m + n/2.))/(-m + n/2.)))*(-2*d + n))/(-2*(-m + n/2.)*(m + \
n/2.) + n)\
\>", "Output",
 CellChangeTimes->{3.506604447297712*^9, 3.506604651497924*^9}]
}, Open  ]]
},
WindowSize->{809, 655},
WindowMargins->{{149, Automatic}, {Automatic, 25}},
FrontEndVersion->"7.0 for Linux x86 (32-bit) (November 10, 2008)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[545, 20, 308, 9, 32, "Input"],
Cell[CellGroupData[{
Cell[878, 33, 179, 4, 32, "Input"],
Cell[1060, 39, 396, 14, 73, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1493, 58, 585, 20, 32, "Input"],
Cell[2081, 80, 556, 20, 58, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2674, 105, 203, 5, 32, "Input"],
Cell[2880, 112, 931, 34, 64, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[3848, 151, 202, 5, 32, "Input"],
Cell[4053, 158, 569, 21, 57, "Output"]
}, Open  ]],
Cell[4637, 182, 92, 1, 32, "Input"],
Cell[CellGroupData[{
Cell[4754, 187, 1918, 64, 77, "Input"],
Cell[6675, 253, 1641, 59, 86, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8353, 317, 237, 7, 32, "Input"],
Cell[8593, 326, 1230, 23, 369, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9860, 354, 259, 8, 32, "Input"],
Cell[10122, 364, 984, 21, 284, "Output"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)

